Merge pull request #3 from Athemis/master
[MineClone.git] / mods / WorldEdit / Chat Commands.md
blob07bcfd61016380d5ea7efd4a39928dbc3b668408
1 Chat Commands\r
2 -------------\r
3 For more information, see the [README](README.md).\r
4 \r
5 Many commands also have shorter names that can be typed faster. For example, if we wanted to use `//move ? 5`, we could instead type `//m ? 5`. All shortened names are listed below:\r
6 \r
7 | Short Name | Original Name      |\r
8 |:-----------|:-------------------|\r
9 | `//i`      | `//inspect`        |\r
10 | `//rst`    | `//reset`          |\r
11 | `//mk`     | `//mark`           |\r
12 | `//umk`    | `//unmark`         |\r
13 | `//1`      | `//pos1`           |\r
14 | `//2`      | `//pos2`           |\r
15 | `//fp`     | `//fixedpos`       |\r
16 | `//v`      | `//volume`         |\r
17 | `//s`      | `//set`            |\r
18 | `//r`      | `//replace`        |\r
19 | `//ri`     | `//replaceinverse` |\r
20 | `//hspr`   | `//hollowsphere`   |\r
21 | `//spr`    | `//sphere`         |\r
22 | `//hdo`    | `//hollowdome`     |\r
23 | `//do`     | `//dome`           |\r
24 | `//hcyl`   | `//hollowcylinder` |\r
26 ### `//about`\r
28 Get information about the mod.\r
30     //about\r
32 ### `//inspect on/off/1/0/true/false/yes/no/enable/disable/<blank>`\r
34 Enable or disable node inspection.\r
36     //inspect on\r
37     //inspect off\r
38     //inspect 1\r
39     //inspect 0\r
40     //inspect true\r
41     //inspect false\r
42     //inspect yes\r
43     //inspect no\r
44     //inspect enable\r
45     //inspect disable\r
46     //inspect\r
48 ### `//reset`\r
50 Reset the region so that it is empty.\r
52     //reset\r
54 ### `//mark`\r
56 Show markers at the region positions.\r
58     //mark\r
60 ### `//unmark`\r
62 Hide markers if currently shown.\r
64     //unmark\r
66 ### `//pos1`\r
68 Set WorldEdit region position 1 to the player's location.\r
70     //pos1\r
72 ### `//pos2`\r
74 Set WorldEdit region position 2 to the player's location.\r
76     //pos2\r
78 ### `//p set/set1/set2/get`\r
80 Set WorldEdit region, WorldEdit position 1, or WorldEdit position 2 by punching nodes, or display the current WorldEdit region.\r
82     //p set\r
83     //p set1\r
84     //p set2\r
85     //p get\r
87 ### `//fixedpos set1 x y z`\r
89 Set a WorldEdit region position to the position at (`<x>`, `<y>`, `<z>`).\r
91     //fixedpos set1 0  0 0\r
92     //fixedpos set1 -30 5 28\r
93     //fixedpos set2 1004 -200 432\r
95 ### `//volume`\r
97 Display the volume of the current WorldEdit region.\r
99     //volume\r
101 ### `//set <node>`\r
103 Set the current WorldEdit region to `<node>`.\r
105     //set air\r
106     //set cactus\r
107     //set Blue Lightstone\r
108     //set dirt with grass\r
110 ### `//mix <node1> ...`\r
112 Fill the current WorldEdit region with a random mix of `<node1>`, `...`.\r
114     //mix air\r
115     //mix cactus stone glass sandstone\r
116     //mix Bronze\r
117     //mix default:cobble air\r
119 ### `//replace <search node> <replace node>`\r
121 Replace all instances of `<search node>` with `<replace node>` in the current WorldEdit region.\r
123     //replace Cobblestone air\r
124     //replace lightstone_blue glass\r
125     //replace dirt Bronze Block\r
126     //replace mesecons:wire_00000000_off flowers:flower_tulip\r
128 ### `//replaceinverse <search node> <replace node>`\r
130 Replace all nodes other than `<search node>` with `<replace node>` in the current WorldEdit region.\r
132     //replaceinverse Cobblestone air\r
133     //replaceinverse flowers:flower_waterlily glass\r
134     //replaceinverse dirt Bronze Block\r
135     //replaceinverse mesecons:wire_00000000_off flowers:flower_tulip\r
137 ### `//hollowsphere <radius> <node>`\r
139 Add hollow sphere centered at WorldEdit position 1 with radius `<radius>`, composed of `<node>`.\r
141     //hollowsphere 5 Diamond Block\r
142     //hollowsphere 12 glass\r
143     //hollowsphere 17 mesecons:wire_00000000_off\r
145 ### `//sphere <radius> <node>`\r
147 Add sphere centered at WorldEdit position 1 with radius `<radius>`, composed of `<node>`.\r
149     //sphere 5 Diamond Block\r
150     //sphere 12 glass\r
151     //sphere 17 mesecons:wire_00000000_off\r
153 ### `//hollowdome <radius> <node>`\r
155 Add hollow dome centered at WorldEdit position 1 with radius `<radius>`, composed of `<node>`.\r
157     //hollowdome 5 Diamond Block\r
158     //hollowdome -12 glass\r
159     //hollowdome 17 mesecons:wire_00000000_off\r
161 ### `//dome <radius> <node>`\r
163 Add dome centered at WorldEdit position 1 with radius `<radius>`, composed of `<node>`.\r
165     //dome 5 Diamond Block\r
166     //dome -12 glass\r
167     //dome 17 mesecons:wire_00000000_off\r
169 ### `//hollowcylinder x/y/z/? <length> <radius> <node>`\r
171 Add hollow cylinder at WorldEdit position 1 along the x/y/z/? axis with length `<length>` and radius `<radius>`, composed of `<node>`.\r
173     //hollowcylinder x +5 8 Bronze Block\r
174     //hollowcylinder y 28 10 glass\r
175     //hollowcylinder z -12 3 mesecons:wire_00000000_off\r
176     //hollowcylinder ? 2 4 default:stone\r
178 ### `//cylinder x/y/z/? <length> <radius> <node>`\r
180 Add cylinder at WorldEdit position 1 along the x/y/z/? axis with length `<length>` and radius `<radius>`, composed of `<node>`.\r
182     //cylinder x +5 8 Bronze Block\r
183     //cylinder y 28 10 glass\r
184     //cylinder z -12 3 mesecons:wire_00000000_off\r
185     //cylinder ? 2 4 default:stone\r
186     \r
187 ### `//pyramid x/y/z? <height> <node>`\r
189 Add pyramid centered at WorldEdit position 1 along the x/y/z/? axis with height `<height>`, composed of `<node>`.\r
191     //pyramid x 8 Diamond Block\r
192     //pyramid y -5 glass\r
193     //pyramid z 2 mesecons:wire_00000000_off\r
194     //pyramid ? 12 mesecons:wire_00000000_off\r
196 ### `//spiral <length> <height> <spacer> <node>`\r
198 Add spiral centered at WorldEdit position 1 with side length `<length>`, height `<height>`, space between walls `<spacer>`, composed of `<node>`.\r
200     //spiral 20 5 3 Diamond Block\r
201     //spiral 5 2 1 glass\r
202     //spiral 7 1 5 mesecons:wire_00000000_off\r
204 ### `//copy x/y/z/? <amount>`\r
206 Copy the current WorldEdit region along the x/y/z/? axis by `<amount>` nodes.\r
208     //copy x 15\r
209     //copy y -7\r
210     //copy z +4\r
211     //copy ? 8\r
213 ### `//move x/y/z/? <amount>`\r
215 Move the current WorldEdit positions and region along the x/y/z/? axis by `<amount>` nodes.\r
217     //move x 15\r
218     //move y -7\r
219     //move z +4\r
220     //move ? -1\r
222 ### `//stack x/y/z/? <count>`\r
224 Stack the current WorldEdit region along the x/y/z/? axis `<count>` times.\r
226     //stack x 3\r
227     //stack y -1\r
228     //stack z +5\r
229     //stack ? 12\r
231 ### `//stack2 <count> <x> <y> <z>`\r
233 Stack the current WorldEdit region `<count>` times by offset `<x>`, `<y>`, `<z>`.\r
235     //stack2 5 3 8 2\r
236     //stack2 1 -1 -1 -1\r
238 ### `//scale <factor>`\r
240 Scale the current WorldEdit positions and region by a factor of positive integer `<factor>` with position 1 as the origin.\r
242     //scale 2\r
243     //scale 1\r
244     //scale 10\r
246 ### `//transpose x/y/z/? x/y/z/?`\r
248 Transpose the current WorldEdit positions and region along the x/y/z/? and x/y/z/? axes.\r
250     //transpose x y\r
251     //transpose x z\r
252     //transpose y z\r
253     //transpose ? y\r
255 ### `//flip x/y/z/?`\r
257 Flip the current WorldEdit region along the x/y/z/? axis.\r
259     //flip x\r
260     //flip y\r
261     //flip z\r
262     //flip ?\r
264 ### `//rotate x/y/z/? <angle>`\r
266 Rotate the current WorldEdit positions and region along the x/y/z/? axis by angle `<angle>` (90 degree increment).\r
268     //rotate x 90\r
269     //rotate y 180\r
270     //rotate z 270\r
271     //rotate ? -90\r
273 ### `//orient <angle>`\r
275 Rotate oriented nodes in the current WorldEdit region around the Y axis by angle `<angle>` (90 degree increment)\r
277     //orient 90\r
278     //orient 180\r
279     //orient 270\r
280     //orient -90\r
282 ### `//fixlight`\r
284 Fixes the lighting in the current WorldEdit region.\r
286     //fixlight\r
288 ### `//hide`\r
290 Hide all nodes in the current WorldEdit region non-destructively.\r
292     //hide\r
294 ### `//suppress <node>`\r
296 Suppress all <node> in the current WorldEdit region non-destructively.\r
298     //suppress Diamond Block\r
299     //suppress glass\r
300     //suppress mesecons:wire_00000000_off\r
302 ### `//highlight <node>`\r
304 Highlight <node> in the current WorldEdit region by hiding everything else non-destructively.\r
306     //highlight Diamond Block\r
307     //highlight glass\r
308     //highlight mesecons:wire_00000000_off\r
310 ### `//restore`\r
312 Restores nodes hidden with WorldEdit in the current WorldEdit region.\r
314     //restore\r
316 ### `//save <file>`\r
318 Save the current WorldEdit region to "(world folder)/schems/`<file>`.we".\r
320     //save some random filename\r
321     //save huge_base\r
323 ### `//allocate <file>`\r
325 Set the region defined by nodes from "(world folder)/schems/`<file>`.we" as the current WorldEdit region.\r
327     //allocate some random filename\r
328     //allocate huge_base\r
330 ### `//load <file>`\r
332 Load nodes from "(world folder)/schems/`<file>`.we" with position 1 of the current WorldEdit region as the origin.\r
334     //load some random filename\r
335     //load huge_base\r
337 ### `//lua <code>`\r
339 Executes `<code>` as a Lua chunk in the global namespace.\r
341     //lua worldedit.pos1["singleplayer"] = {x=0, y=0, z=0}\r
342     //lua worldedit.rotate(worldedit.pos1["singleplayer"], worldedit.pos2["singleplayer"], "y", 90)\r
344 ### `//luatransform <code>`\r
346 Executes `<code>` as a Lua chunk in the global namespace with the variable pos available, for each node in the current WorldEdit region.\r
348     //luatransform minetest.add_node(pos, {name="default:stone"})\r
349     //luatransform if minetest.get_node(pos).name == "air" then minetest.add_node(pos, {name="default:water_source"})\r
351 ### `//mtschemcreate <file>`\r
353 Save the current WorldEdit region using the Minetest Schematic format to "(world folder)/schems/`<file>`.mts".\r
355     //mtschemcreate some random filename\r
356     //mtschemcreate huge_base\r
358 ### `//mtschemplace <file>`\r
360 Load nodes from "(world folder)/schems/`<file>`.mts" with position 1 of the current WorldEdit region as the origin.\r
362     //mtschemplace some random filename\r
363     //mtschemplace huge_base\r
365 ### `//mtschemprob start/finish/get`\r
367 After using `//mtschemprob start` all nodes punched will bring up a text field where a probablity can be entered.\r
368 This mode can be left with `//mtschemprob finish`. `//mtschemprob get` will display the probabilities saved for the nodes.\r
370     //mtschemprob get\r
372 ### `//clearobjects`\r
374 Clears all objects within the WorldEdit region.\r
376     //clearobjects\r